//package com.zjx.bean;
//
//
//import org.springframework.beans.factory.InitializingBean;
//import org.springframework.beans.factory.SmartInitializingSingleton;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.beans.factory.config.ConfigurableBeanFactory;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Scope;
//import org.springframework.stereotype.Component;
//
//import java.util.Map;
//
//
////@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
////容器就应该给Cat再创建一个对象
//@Component
//public class Cat implements InitializingBean, SmartInitializingSingleton {
//	private String name;
//
//
//     public Cat(){};
////	public Cat(String name) {
////		//这里会报一个错误，找不到bean类型是String 名字是 name的
////		this.name = name;
////	}
//
//	//此处能拿到容器中的系统环境变量信息  systemEnvironment是默认的
//	@Autowired
//	private Map<Object, Object> systemEnvironment;
//
//	@Value("${JAVA_HOME}") //自动赋值功能
//	public void setName(String name) {
//		System.out.println("cat....setName正在赋值调用....");
//		this.name = name;
//	}
//
//	//注解怎么定义这个是初始化方法？
//	public String getName() {
//		return name;
//	}
//
//	@Override
//	public void afterPropertiesSet() throws Exception {
//		System.out.println("CatInitializingBean..afterPropertiesSet...");
//	}
//
//	@Override
//	public void afterSingletonsInstantiated() {
//		System.out.println("所有组件都创建完成以后，再来执行这个方法.....");
//	}
//}
